package com.xiaoge;

import com.xiaoge.service.OrderService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.annotation.PropertySource;

/**
 * TODO
 * 		@ComponentScan(basePackages = "com.xiaoge.service", excludeFilters = {@ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, value = UserService.class)})
 * 		@ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, value = UserService.class) 表示排除UserService.class类型的bean
 * 		@ComponentScan.Filter(type = FilterType.ANNOTATION, value = Component.class) 表示排除标注了@Component这个注解类型的bean
 * 		@ComponentScan.Filter(type = FilterType.ASPECTJ, value = XiaogeAspect.class) 表示排除动态代理里面XiaogeAspect.class的bean
 * 		@ComponentScan.Filter(type = FilterType.REGEX, pattern = {"com.dist.common.db.redis.RedisConfiguration"}) 表示排除pattern里面的正则表达式的内容bean
 * 		CUSTOM, 自定义类只要继承了TypeFilter类, 从写match方法就行
 *
 * todo		@ComponentScan(basePackageClasses = UserService.class) 表示获取当前类所在的包, 作为扫描路径
 * 			注意: 如果resources/META-INF/有spring.components它就不回去扫描包了, 而是直接用spring.components里面配置的类, 如果文件为空, 还是会去扫描包
 *
 *
 *
 * @author <a href="mailto:1330137071@qq.com">Zhang Xiao</a>
 * @since
 */
@EnableAspectJAutoProxy
@ComponentScan("com.xiaoge.circulardependency")
@PropertySource("classpath:spring.properties")
public class AppConfig {

	@Bean
	public OrderService orderService() {
		return new OrderService();
	}

}
